<html>
 <head>
  <script>
   window.which = "child";
   parent.bar();
  </script>
 </head>
</html>